add P2PAnnex constructor
authorJoey Hess <joeyh@joeyh.name>
Wed, 30 Jul 2025 16:02:33 +0000 (12:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 30 Jul 2025 16:09:17 +0000 (12:09 -0400)
commitf631bc9e567447c7c0f3c0d0bb5f77f8bdd66303
tree27407e422f1d1c4cc1bcb8bd4d1b6f1c6a5ec245
parent2a81b26e8eec5d641d88b99be0dda1a10b25b37f
add P2PAnnex constructor

This is for p2p-annex:: urls that will use the new generic P2P
transport.

In addressCredsFile, threw in an url encoding of any non-alphanumeric
characters that are in the address. This is to avoid any possible path
traversal attacks via a p2p-annex:: url, since the address part of it
could contain any characters. And, went ahead and did the same url
encoding of tor-annex:: urls, even though tor onion addresses are all
alphanumerics, on the off chance that might avoid a similar problem.
(It does not seem likely enough to treat it as a security hole.)
Command/EnableTor.hs
P2P/Address.hs
P2P/Auth.hs
doc/design/generic_p2p_transport.mdwn